<?php

abstract class Produit {

    private $reference;
    private $prix;
    private static $nbInstances = 0;

    public function __construct($reference, $prix) {
        $this->reference = $reference;
        $this->prix = $prix;
        self::$nbInstances++;
    }

    public function __toString() {
        return "Reference: " . $this->reference .
                " Prix: " . $this->prix;
    }
    public function getReference() {
        return $this->reference;
    }

    public function getPrix() {
        return $this->prix;
    }

    public abstract function getClasse ();

}

?>
